1. Technical Field
The present invention relates generally to an improved data processing system and in particular to a method and apparatus for processing data. Still more particularly, the present invention relates to a method, apparatus, and computer instructions for processing data packets.
2. Description of Related Art
With the widespread use of networks, data packets are transmitted between different data processing systems. Each time a data packet is received, the data packet is processed before passing the data in the packet up to an application for use. In processing a data packet, a checksum calculation is performed to verify that the data in the data packet was transmitted without errors. Such a calculation is present when using transmission control protocol/Internet protocol (TCP/IP).
When these checksum calculations are performed by the host processor or processors in a data processing system, the calculations are a processor intensive task. Many network adapters provide a task offload feature called checksum offload. With this feature, the network adapter calculates the needed checksums to verify whether the data packet is a good data packet. Additionally, checksum offload also provides for generating and adding checksums to data packets that are to be transmitted onto a network. As used herein, the term calculating with respect to checksums involves both the process of generating a checksum to send a data packet and verifying a checksum when a data packet is received. In this manner, the processor resources of the host processor or processors are freed up for other uses.
The resources freed by the offload feature are reduced in data processing systems that partition resources. Increasingly large symmetric multi-processor data processing systems are being partitioned and used as smaller systems. These types of systems also are referred to as logical partitioned (LPAR) data processing systems. A logical partitioned functionality within a data processing system allows multiple copies of a single operating system or multiple heterogeneous operating systems to be simultaneously run on a single data processing system platform. A partition, within which an operating system image runs, is assigned a non-overlapping subset of the platforms resources. These platform allocatable resources include one or more architecturally distinct processors with their interrupt management area, regions of system memory, and input/output (I/O) adapter bus slots. The partition's resources are represented by the platform's firmware to the operating system image.
With a logical partitioned data processing system, a number of partitions may be present in which each partition has an operating system that may send or receive data packets, using virtual and physical network adapters. In many cases, only a single physical network adapter is present and cannot be shared by all of the partitions. A virtual network adapter may be used by the other partitions to send and receive data packets between the partitions without a physical network adapter. In this type of setup one of the partitions is associated with the physical network adapter and a virtual network adapter. This partition is referred to as the hosting partition. The other partitions use virtual adapters to send packets to each other in what is called an interpartition virtual network. The virtual adapters also are used to send data packets to the hosting portion for transport outside of the interpartition virtual network.
Currently, each partition is required to generate and verify checksums when sending data packets using virtual network adapters. No hardware supporting checksum offload is available in all but the hosting partition. In this situation, the use of processor resources is intensive, even if the physical adapter supports checksum offload because only one partition, the hosting partition does not need to verify a checksum.
Therefore, it would be advantageous to have an improved method, apparatus, and computer instructions for verifying checksums for data packets.